package com.cmw.core.security.certificate;

import java.io.IOException;

import org.apache.commons.codec.binary.Base64;

import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;

public class Base64Code{

    /**  
     * 编码  
     * @param filecontent  
     * @return String  
     */ 
    public static String encode(byte[] data){
    	
    	return Base64.encodeBase64String(data);  
    }  
 
    /**  
     * 编码 字符串数据
     * @param filecontent  
     * @return String  
     */ 
    public static String encode(String data){  
    	return Base64.encodeBase64String(data.getBytes());  
    }  
    
    /**  
     * 解码  
     * @param filecontent  
     * @return string  
     */ 
    public static byte[] decode(String str){  
	    byte[] bt = null;  
	    bt = Base64.decodeBase64(str);  
        return bt;  
    }  
    
    /**  
     * 将Base64 数据字符串 解码成正常字符串  
     * @param filecontent  
     * @return string  
     */ 
    public static String decode2str(String str){  
    	byte[] bt = Base64.decodeBase64(str);  
        return new String(bt);  
    }  
 
    
    private static BASE64Encoder encoder = new BASE64Encoder();
	private static BASE64Decoder decoder = new BASE64Decoder();
	/**
	 * BASE64 编码
	 * 
	 * @param s
	 * @return
	 */
	public static String encodeBufferBase64(byte[] buff)
	{
		return buff == null?null:encoder.encodeBuffer(buff).trim();
	}
	
	
	/**
	 * BASE64解码
	 * 
	 * @param s
	 * @return
	 */
	public static byte[] decodeBufferBase64(String s)
	{
		try
		{
			return s == null ? null : decoder.decodeBuffer(s);
		}
		catch (IOException e)
		{
			e.printStackTrace();
		} 
		return null;
	}
	

	/**
	 * base64编码
	 * 
	 * @param bytes
	 *            字符数组
	 * @return
	 * @throws IOException
	 */
	public static String encodeBytes(byte[] bytes) throws IOException
	{
		return new BASE64Encoder().encode(bytes).replace("\n", "").replace("\r", "");
	}

	/**
	 * base64解码
	 * 
	 * @param bytes
	 *            字符数组
	 * @return
	 * @throws IOException
	 */
	public static String decodeBytes(byte[] bytes) throws IOException
	{
		return new String(new BASE64Decoder().decodeBuffer(new String(bytes)));
	}
	
    /**  
     * @param args  
     */ 
    public static void main(String[] args) {  
    	Base64Code te = new Base64Code();  
        String oldStr = "_assurance_acceptting&source=_mainframe_desktop&stage=5&projectId=29&customerId=14&custType=1&projectNumber=HRZ1200001&todo=_assurance_project_projectstate";  
       String  encodeStr = te.encode(oldStr);  
        System.out.println("编码后:"+encodeStr
        		+"\n 长度："+encodeStr.length());  
          
          
        String str2 = new String(te.decode(encodeStr));
        
        //System.out.println("原字符串长度:"+oldStr.length()+",解码字符串长度:"+str2.length());
        String str3 = "PHAgc3R5bGU9Im1hcmdpbi10b3A6IDBweDsgbWFyZ2luLWJvdHRvbTogMHB4OyBwYWRkaW5nOiAwcHg7IHdpZHRoOiA3OTdweDsgZGlzcGxheTogaW5saW5lLWJsb2NrOyBjb2xvcjogcmdiKDUxLCA1MSwgNTEpOyBmb250LWZhbWlseTogzqLI7dHFutosIMvOzOUsIEFyaWFsLCBWZXJkYW5hLCB0YWhvbWEsIFNyaWFsLCBoZWx2ZXRpY2EsIHNhbnMtc2VyaWY7IGZvbnQtc2l6ZTogMTRweDsgbGluZS1oZWlnaHQ6IDI2cHg7IHdoaXRlLXNwYWNlOiBub3JtYWw7IHRleHQtaW5kZW50OiAyMXB0OyBiYWNrZ3JvdW5kOiByZ2IoMjU1LCAyNTUsIDI1NSk7Ij48c3BhbiBzdHlsZT0ibWFyZ2luOiAwcHg7IHBhZGRpbmc6IDBweDsgZm9udC1zaXplOiAxNnB4OyI+vt2ztbi7ODi52c34tcS9u9LXyv2+3c/Uyr6jrDIwMTbE6jTUwjfI1aOss7W4uzg4tcTA27v9vbvS19fctu7V/cq9zbvGxtK70trUqqOstvi0y8qxvuDA67O1uLs4ONX9yr3Jz8/f0rvE6tPWzuW49tTCoaM8L3NwYW4+PC9wPjx0YWJsZSBjZWxscGFkZGluZz0iMCIgY2VsbHNwYWNpbmc9IjAiPjx0Ym9keT48dHIgY2xhc3M9ImZpcnN0Um93Ij48dGQgd2lkdGg9IjEyLjQ2NjciIGhlaWdodD0iMCIgc3R5bGU9Im1hcmdpbjogMHB4OyBwYWRkaW5nOiAwcHg7Ij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